package com.blq.utils;

import com.blq.common.utils.SendMessageUtils;
import com.blq.common.utils.spring.SpringUtils;
import com.blq.system.service.ISysConfigService;

public class SendOrderMsg {

    public static boolean sendDIY(String message, String phoneNumber) {
        String open = SpringUtils.getBean(ISysConfigService.class).selectConfigByKey("order.send.msg");
        if ("open".equals(open)) {
            return SendMessageUtils.sendDIY(message, phoneNumber);
        }
        return true;
    }

    public static boolean sendDIY(String message, String phoneNumber, String phoneSpare) {
        String open = SpringUtils.getBean(ISysConfigService.class).selectConfigByKey("order.send.msg");
        if ("open".equals(open)) {
            return SendMessageUtils.sendDIY(message, phoneNumber, phoneSpare);
        }
        return true;
    }

}
